
cachepool=cachepool
datapool=datapool

echo "cachepool $cachepool"
echo "datapool $datapool"

ceph osd tier add $datapool $cachepool
ceph osd tier cache-mode $cachepool writeback
ceph osd tier set-overlay $datapool $cachepool

ceph osd pool set $cachepool hit_set_type bloom

ceph osd pool set $cachepool hit_set_count 10
ceph osd pool set $cachepool hit_set_period 3

#G
size=`expr 200 \* 1024 \* 1024 \* 1024`
ceph osd pool set $cachepool target_max_bytes $size
ceph osd pool set $cachepool target_max_objects 0

ceph osd pool set $cachepool cache_target_dirty_ratio 0.70

ceph osd pool set $cachepool cache_target_dirty_high_ratio 0.80

ceph osd pool set $cachepool cache_target_full_ratio 0.90

ceph osd pool set $cachepool cache_min_flush_age 10
ceph osd pool set $cachepool cache_min_evict_age 10

ceph osd pool set $cachepool min_write_recency_for_promote 0
ceph osd pool set $cachepool min_read_recency_for_promote 0
